namespace WPS.Model
{
    using System;
    using System.Data.Entity;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Linq;

    public partial class WPSModel : DbContext
    {
        public WPSModel()
            : base("name=WPSModel")
        {
        }

        public virtual DbSet<FileHistoryVersion> FileHistoryVersion { get; set; }
        public virtual DbSet<WPSFileInfo> WPSFileInfo { get; set; }
        public virtual DbSet<WPSUserInfo> WPSUserInfo { get; set; }
        public virtual DbSet<AuthorizeInfo> AuthorizeInfo { get; set; }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<FileHistoryVersion>()
                .Property(e => e.ID)
                .IsUnicode(false);

            modelBuilder.Entity<FileHistoryVersion>()
                .Property(e => e.FILE_ID)
                .IsUnicode(false);

            modelBuilder.Entity<FileHistoryVersion>()
                .Property(e => e.CREATOR)
                .IsUnicode(false);

            modelBuilder.Entity<FileHistoryVersion>()
                .Property(e => e.EDITOR)
                .IsUnicode(false);

            modelBuilder.Entity<FileHistoryVersion>()
                .Property(e => e.TIME_STAMP)
                .IsFixedLength();

            modelBuilder.Entity<WPSFileInfo>()
                .Property(e => e.ID)
                .IsUnicode(false);

            modelBuilder.Entity<WPSFileInfo>()
                .Property(e => e.CREATOR)
                .IsUnicode(false);

            modelBuilder.Entity<WPSFileInfo>()
                .Property(e => e.EDITOR)
                .IsUnicode(false);

            modelBuilder.Entity<WPSFileInfo>()
                .Property(e => e.TIME_STAMP)
                .IsFixedLength();

            modelBuilder.Entity<WPSUserInfo>()
                .Property(e => e.ID)
                .IsUnicode(false);

            modelBuilder.Entity<WPSUserInfo>()
                .Property(e => e.PERMISSION)
                .IsUnicode(false);

            modelBuilder.Entity<WPSUserInfo>()
                .Property(e => e.WEB_OFFICE_TOKEN)
                .IsUnicode(false);

            modelBuilder.Entity<WPSUserInfo>()
                .Property(e => e.TIME_STAMP)
                .IsFixedLength();

            modelBuilder.Entity<AuthorizeInfo>()
              .Property(e => e.ID)
              .IsUnicode(false);

            modelBuilder.Entity<AuthorizeInfo>()
              .Property(e => e.USER_ID)
              .IsUnicode(false);

            modelBuilder.Entity<AuthorizeInfo>()
             .Property(e => e.APP_ID)
             .IsUnicode(false);

            modelBuilder.Entity<AuthorizeInfo>()
            .Property(e => e.OPEN_ID)
            .IsUnicode(false);

            modelBuilder.Entity<AuthorizeInfo>()
              .Property(e => e.AVATAR)
              .IsUnicode(false);

            modelBuilder.Entity<AuthorizeInfo>()
                .Property(e => e.NICE_NAME)
                .IsUnicode(false);

            modelBuilder.Entity<AuthorizeInfo>()
             .Property(e => e.SEX)
             .IsUnicode(false);

            modelBuilder.Entity<AuthorizeInfo>()
           .Property(e => e.UNIOIN_ID)
           .IsUnicode(false);

            modelBuilder.Entity<AuthorizeInfo>()
             .Property(e => e.TIME_STAMP)
             .IsFixedLength();
        }
    }
}
